package com.link2room.aeriabots.controller.api;

import com.link2room.aeriabots.dto.result.base.WxMemberInfoResDto;
import com.link2room.aeriabots.facade.IWXMemberInfoFacadeService;
import com.link2room.common.dto.result.base.BaseResultDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by LN on 2017/10/20
 */
@Api(tags ={"微信会员信息"} )
@RestController
@RequestMapping("/api/WxMemberInfo")
public class WxMemberInfoController {

    @Resource
    private IWXMemberInfoFacadeService wxMemberInfoFacadeService;
    @ApiOperation(value="当前登录微信会员信息",response = WxMemberInfoResDto.class)
    @RequestMapping(method = RequestMethod.GET)
    public BaseResultDto getCurrentMemberInfo(
    ) throws Exception {
        BaseResultDto res = new BaseResultDto();
        res.setResultCode(0);
        res.setResultInfo(wxMemberInfoFacadeService.getCurrentMemberInfo());
        return res;
    }
}
